package com.woniuxy.happylife.order.configuration;

import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Title: RedissonConfiguration
 * @ProjectName: javatest
 * @Description: TODO
 * @Author: chowinggum
 * @Date: 2022/1/6 20:19
 */
@Configuration
public class RedissonConfiguration {
    @Bean
    public RedissonClient redissonClient(){
        Config config=new Config();
         config.useSingleServer().setAddress("redis://localhost:6379");
         config.useSingleServer().setPassword("123");
         return Redisson.create(config);
    }
}
